This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
~Yentl Opgeroverjip 20.Nov.03 04:42 PM a Web browser Domino Designer6.0.2 CF2Windows XP
I've pulled a recommended script from Lotus Support to assist with reducing the number of replication/save conflicts. I modified it by adding a Messagebox to the code to let the users know what is going on. I'm still new to scripting, but thought it would be cool to have the messagebox display who has the current document open. Does anyone have any suggestions on how to make this work? I'm not sure what the script command is to pull the ID.
I tried some variations, but kept receiving errors. Here is the code in it's current fashion:
NOTE: My Unamea(1) string was an attempt to pull the information. It currently not being used.
Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
Dim session As New notessession
Dim db As notesdatabase
Dim item As notesitem
Dim array(1) As String
Dim Unamea(1) As String
Set db=session.currentdatabase
If source.isnewdoc=False Then
Set doc=source.document
If doc.hasitem("Field1") Then
Set item=doc.getfirstitem("field1")
array(0)=item.values(0)
If array(0)="Locked" Then
Messagebox "This document is currently being edited. Please try back later.",0,"Document In-Use"
continue=False
Delete doc
Else
continue=True
array(0)="Locked"
item.values=array(0)
docsaved=doc.save(False, False)
If Not docsaved Then
continue=False
Delete doc
End If
End If
End If
End If
End Sub